package com.uobgroup.ews.uam.core.service;

import java.util.Date;
import java.util.List;

import com.uobgroup.ews.uam.core.domain.ChangeLog;
import com.uobgroup.ews.uam.core.enums.OperateType;

/**
 * Service interface for managing change logs of UMM
 * @author ndduy
 *
 */
public interface ChangeLogService {

   /**
    * Get all change logs based on specific search range
    * @author ndduy
    * @param firstResult
    * @param maxResult
    * @return {@link List}
    */
   public List<ChangeLog> findAll(int firstResult, int maxResult);
   
   /**
    * Add new change log to the database
    * @author ndduy
    * @param changeLog
    */
   public void addNew(ChangeLog changeLog);
   
   /**
    * find generic object by id and class name
    * @author ndduy
    * @param id
    * @param objectClass
    * @return {@link Object}
    */
   public Object findEntityById(Long id, Class<?> objectClass);
   
   /**
    * Looking for change logs in the database based on input params
    * @author ndduy
    * @param operateType {@link OperateType}
    * @param userId {@link String}
    * @param fromDate {@link Date}
    * @param toDate {@link Date}
    * @param firstResult {@link Integer}
    * @param maxResult {@link Integer}
    * @return {@link List ChangeLog}
    */
   public List<ChangeLog> find(OperateType operateType, String userId, Date fromDate, Date toDate, int firstResult, int maxResult);
   
   public ChangeLog updateChangeLog(ChangeLog changeLog);
   
   public ChangeLog findById(Long id);
   
   public Long count();
   
   public Long count(OperateType operateType, String userId, Date fromDate, Date toDate);
   
   public List<ChangeLog> findAll();
}
